<?php
	//统一价格
	
	if($_POST['act']=='changepoints')
	{
		if ($_POST['fun']&&$_POST['points']&&$_POST['member_id']){
			include_once("$config[webroot]/module/member/includes/plugin_member_class.php");
			$member=new member();
			$member->add_points($_POST['member_id'], $_POST[fun].$_POST[points], 'ADMIN_OPERATION','',$_POST[desc]);
		}
		echo '<script>window.top.DialogManager.close("unify");</script>';
		exit;
	}
	//更改积分
	if($_GET['type']=='changepoints')
	{
		$tpl->assign('member_id',$_GET['member_id']);
	}
	if($_GET['type']=='showpointslogs')
	{
		$sql="select * from ".POINTSLOG." where member_id='{$_GET[member_id]}'";
		$db->query($sql);
		$pointslogs=$db->getRows();
		$tpl->assign('pointslogs',$pointslogs);
	}
	$tpl->assign("config",$config);
	$tpl->display("member_unify.htm");
	
?>